package com.ccys.cms.service.discount;

import com.ccys.common.vo.ResponseResult;
import com.ccys.db.dto.discount.MatchingPremiumCouponsDto;
import com.ccys.db.dto.discount.PromoCodeAutomatedDto;
import com.ccys.db.entity.TblPromoCodeAutomated;
import com.ccys.db.rely.service.BaseService;
import com.ccys.db.vo.discount.PromoCodeAutomatedMemberListVo;
import com.ccys.db.vo.discount.PromoCodeAutomatedPageQueryVo;
import com.github.pagehelper.PageInfo;

import java.text.ParseException;
import java.util.List;

/**
 * @program: WhiteCoat
 * @description: 自动优惠卷接口
 * @author: ZhangJingCan
 * @create: 2023-12-15 15:35
 **/
public interface PromoCodeAutomatedService extends BaseService<TblPromoCodeAutomated> {
    ResponseResult savePromoCodeAutomated(PromoCodeAutomatedDto dto);

    ResponseResult deletePromoCodeAutomated(PromoCodeAutomatedDto dto);

    ResponseResult updatePromoCodeAutomatedStatus(PromoCodeAutomatedDto dto);

    /**
     * 传入用户信息 - 匹配符合条件的高级优惠卷 - 并且判断是否发送邮件 - 同时发送邮件
     * @param dto 用户信息：id - 身份证 - 邮箱号
     * @throws ParseException
     */
    void queryAvailablePremiumCouponsByEmail(MatchingPremiumCouponsDto dto) throws ParseException;

    ResponseResult<PageInfo<PromoCodeAutomatedPageQueryVo>, Object> findPagePromoCodeAutomated(PromoCodeAutomatedDto dto);

    ResponseResult<List<PromoCodeAutomatedMemberListVo>, Object> findListPromoCodeAutomatedMemberByCodeId(PromoCodeAutomatedDto dto);

}
